package com.zzl.finance.data.dto;

import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.finance.data.constant.BusinessModeEnum;
import com.zzl.finance.data.constant.ProductStatusEnum;
import com.zzl.finance.data.constant.SealTypeEnum;
import lombok.Data;

import java.io.Serializable;

/**
 * 金融产品
 *
 * @author gull
 * @date 2021-12-22 19:40:27
 */
@Data
@ApidocModel
public class FinancialProductListDto implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApidocModelProperty(description = "主键")
    private Integer id;
    @ApidocModelProperty(description = "金融机构id")
    private Integer financeInstitutyId;
    @ApidocModelProperty(description = "金融机构")
    private String instinctyName;
    @ApidocModelProperty(description = "产品名称")
    private String productName;

    @ApidocModelProperty(description = "融资利率")
    private Double annualizedInterestRate;
    @ApidocModelProperty(description = "是否年化,0：否，1:是")
    private Integer isAnnualizedInterestRate;
    @ApidocModelProperty(description = "业务方式 1 无追索权")
    private Integer businessMode;
    @ApidocModelProperty(description = "业务方式 1 无追索权")
    private String businessModeName;


    @ApidocModelProperty(description = "预计放款天数")
    private Integer loanDays;
    @ApidocModelProperty(description = "产品状态 0 失效 1 启用")    private Integer productStatus;
    @ApidocModelProperty(description = "产品状态 0 失效 1 启用")
    private String productStatusName;

    public String getProductStatusName() {
        return ProductStatusEnum.getValue(productStatus);
    }
    @ApidocModelProperty(description = "用章类型 1 公章")
    private Integer sealType;
    @ApidocModelProperty(description = "用章类型 1 公章")
    private String sealTypeName;

    public String getSealTypeName() {
        return SealTypeEnum.getValue(sealType);
    }

    @ApidocModelProperty(description = "宽限天数")
    private Integer graceDays;
    @ApidocModelProperty(description = "宽限期是否计息，0 否，1 是")
    private Integer isGraceCost;
    @ApidocModelProperty(description = "备注")
    private String remark;


    public String getBusinessModeName() {
        return BusinessModeEnum.getValue(businessMode);
    }

}
